<template>
    <div>
        <HomeHeader  :type_="type_"></HomeHeader>
<v-content >
    <v-container>
        <v-file-input
                accept="image/*"
                placeholder="Pick an avatar"
                prepend-icon="mdi-camera"
                label="Avatar"
                v-model="test"
        ></v-file-input>
        <v-btn rounded color="primary" dark @click="_upload">上传</v-btn>
    </v-container>
    </v-content>
    </div>
</template>
<script>
export default {
  name:"Home",
  data(){
    return {
        type_:'adm',
        test:null}
},
    methods: {
        _upload(){
            // this.data._option ='1000'
            var data=new FormData()
            data.append("file",this.test)
            this.$http.post(data).then((res)=>{
                this.response=res
            }).catch((err)=>{
                this.response=err
            })
        }
  }
}
</script>

<style scoped>

</style>

